package com.liruan.rest.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.liruan.rest.annotation.AuthRequired;
import com.liruan.rest.controller.response.JSONResponse;
import com.liruan.rest.dto.DTOFactory;
import com.liruan.rest.dto.ResultCodeOnlyDTO;
import com.liruan.rest.service.result.ResultCode;

@RequestMapping("debug")
@RestController
public class DebugController
{
	@AuthRequired
	@GetMapping(value = "")
	public JSONResponse<ResultCodeOnlyDTO> hello()
	{
		ResultCodeOnlyDTO dto = DTOFactory.createResultCodeOnlyDTO(ResultCode.GENERAL_SUCCESS);
		return new JSONResponse<ResultCodeOnlyDTO>(dto.getResultCode(), dto);
	}
}
